3.330 \(\int \cot (c+d x) (a+i a \tan (c+d x))^m \, dx\)

Optimal. Leaf size=89 \[ \frac{(a+i a \tan (c+d x))^m \, _2F_1\left (1,m;m+1;\frac{1}{2} (i \tan (c+d x)+1)\right )}{2 d m}-\frac{(a+i a \tan (c+d x))^m \, _2F_1(1,m;m+1;i \tan (c+d x)+1)}{d m} \]

[Out]

(Hypergeometric2F1[1, m, 1 + m, (1 + I*Tan[c + d*x])/2]*(a + I*a*Tan[c + d*x])^m)/(2*d*m) - (Hypergeometric2F1
[1, m, 1 + m, 1 + I*Tan[c + d*x]]*(a + I*a*Tan[c + d*x])^m)/(d*m)

________________________________________________________________________________________

Rubi [A]  time = 0.140238, antiderivative size = 89, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.227, Rules used = {3562, 3481, 68, 3599, 65} \[ \frac{(a+i a \tan (c+d x))^m \, _2F_1\left (1,m;m+1;\frac{1}{2} (i \tan (c+d x)+1)\right )}{2 d m}-\frac{(a+i a \tan (c+d x))^m \, _2F_1(1,m;m+1;i \tan (c+d x)+1)}{d m} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]*(a + I*a*Tan[c + d*x])^m,x]

[Out]

(Hypergeometric2F1[1, m, 1 + m, (1 + I*Tan[c + d*x])/2]*(a + I*a*Tan[c + d*x])^m)/(2*d*m) - (Hypergeometric2F1
[1, m, 1 + m, 1 + I*Tan[c + d*x]]*(a + I*a*Tan[c + d*x])^m)/(d*m)

Rule 3562

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)/((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[a/(
a*c - b*d), Int[(a + b*Tan[e + f*x])^m, x], x] - Dist[d/(a*c - b*d), Int[((a + b*Tan[e + f*x])^m*(b + a*Tan[e
+ f*x]))/(c + d*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2
, 0] && NeQ[c^2 + d^2, 0]

Rule 3481

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Dist[b/d, Subst[Int[(a + x)^(n - 1)/(a - x), x]
, x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 + b^2, 0]

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 3599

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(b*B)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x
]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && EqQ[A*b + a*B,
 0]

Rule 65

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)*Hypergeometric2F1[-m, n +
 1, n + 2, 1 + (d*x)/c])/(d*(n + 1)*(-(d/(b*c)))^m), x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Inte
gerQ[m] || GtQ[-(d/(b*c)), 0])

Rubi steps

\begin{align*} \int \cot (c+d x) (a+i a \tan (c+d x))^m \, dx &=i \int (a+i a \tan (c+d x))^m \, dx-\frac{i \int \cot (c+d x) (a+i a \tan (c+d x))^m (i a+a \tan (c+d x)) \, dx}{a}\\ &=\frac{a \operatorname{Subst}\left (\int \frac{(a+x)^{-1+m}}{a-x} \, dx,x,i a \tan (c+d x)\right )}{d}+\frac{a \operatorname{Subst}\left (\int \frac{(a+i a x)^{-1+m}}{x} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac{\, _2F_1\left (1,m;1+m;\frac{1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m}-\frac{\, _2F_1(1,m;1+m;1+i \tan (c+d x)) (a+i a \tan (c+d x))^m}{d m}\\ \end{align*}

Mathematica [F]  time = 11.148, size = 0, normalized size = 0. \[ \int \cot (c+d x) (a+i a \tan (c+d x))^m \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[Cot[c + d*x]*(a + I*a*Tan[c + d*x])^m,x]

[Out]

Integrate[Cot[c + d*x]*(a + I*a*Tan[c + d*x])^m, x]

________________________________________________________________________________________

Maple [F]  time = 0.628, size = 0, normalized size = 0. \begin{align*} \int \cot \left ( dx+c \right ) \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{m}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)*(a+I*a*tan(d*x+c))^m,x)

[Out]

int(cot(d*x+c)*(a+I*a*tan(d*x+c))^m,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{m} \cot \left (d x + c\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))^m,x, algorithm="maxima")

[Out]

integrate((I*a*tan(d*x + c) + a)^m*cot(d*x + c), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\left (\frac{2 \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{m}{\left (i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))^m,x, algorithm="fricas")

[Out]

integral((2*a*e^(2*I*d*x + 2*I*c)/(e^(2*I*d*x + 2*I*c) + 1))^m*(I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c
) - 1), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))**m,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{m} \cot \left (d x + c\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))^m,x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)^m*cot(d*x + c), x)